From 2301a8d9da3bd4f19a36145cb467c21c41e5abff Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sat, 29 Apr 2006 13:55:38 +0000 Subject: [PATCH] Fix bug in wfMsgExt under PHP 5.1.2 --- RELEASE-NOTES | 1 + includes/GlobalFunctions.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 53ab7eef91..0c14517d38 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -140,6 +140,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * The returnto parameter is now actually used by SpecialUserlogin.php * Parser can now know that it is parsing an interface message * (bug 4737) MediaWiki:Viewcount supports {{PLURAL}} now +* Fix bug in wfMsgExt under PHP 5.1.2 == Compatibility == diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 53a7bdbc45..5502d9ca7c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -574,7 +574,8 @@ function wfMsgExt( $key, $options ) { $string = $wgOut->parse( $string, true, true ); } elseif ( in_array('parseinline', $options) ) { $string = $wgOut->parse( $string, true, true ); - if( preg_match( "~^

(.*)\n?

$~", $string, $m = null ) ) { + $m = array(); + if( preg_match( "~^

(.*)\n?

$~", $string, $m ) ) { $string = $m[1]; } } elseif ( in_array('escape', $options) ) { -- 2.20.1